<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <div id="app">
    <form>
      <div>
        userName: <input type="text" v-model.lazy="userName">
      </div>
      <div>
        passWord: <input type="password" v-model="passWord">
      </div>
      <div>age:<input type="number" v-model.number="age"></div>
      <div>
        sex:
        <input type="radio" value="男" v-model="sex">男
        <input type="radio" value="女" v-model="sex">女
      </div>
      <div>
        likes:
        <input type="checkbox" v-model="likes" value="高">高
        <input type="checkbox" v-model="likes" value="忽哟">忽哟
        <input type="checkbox" v-model="likes" value="耍">耍
        <input type="checkbox" v-model="likes" value="有车">有车
      </div>
      <div>
        edu:
        <select name="edu" id="edu" v-model="edu">
          <option value="1">大学</option>
          <option value="2">大专</option>
          <option value="3">高中</option>
          <option value="4">初中</option>
          <option value="5">小学</option>

        </select>
      </div>
      <div>
        infos:
        <textarea name="infos" id="infos" cols="30" rows="10" v-model.trim="info"></textarea>
      </div>
      <div>
        photo:
        <!-- 文件上传，不在v-model 双向绑定的！ 只能通过绑定change事件，来获取files[0] -->
        <input type="file" v-model="photo">
        </input>
      </div>
    </form>
    <hr>
    输入的结果：

    <div>
      userName: {{userName}} <br>
      password: {{passWord}} <br>
      sex: {{sex}} <br>
      likes: {{likes}} <br>
      edu: {{edu}} <br>
      info: {{info}}
      <br>
      photo: {{photo}}
    </div>


    <script src="./js/vue.js"></script>
    <script>

      var vm = new Vue( {
        el: "#app", // vm 挂载到哪一个DOM节点上面
        data: {
          userName: '文庆武',
          passWord: "123456",
          sex: '女',
          likes: [ '耍' ],
          edu: "3",
          info: '我十一出去了',
          photo: null,
          age: 19,
        }
      } );

    </script>
</body>

</html>